package org.example.enums;

/**
 * 短信发送类型枚举
 * @author hanxi
 */
public enum SmsSendTypeEnum {

    LOGIN(1,"login","登录"),RETRIEVE_PASSWORD(2,"rePassword","修改密码"),
    REGIST(3,"regist", "注册"),UPDATE_MEMBER_INFO(4,"updateMemberInfo","修改用户信息");

    private Integer id;

    private String regionName;

    private String name;

    SmsSendTypeEnum(Integer id, String regionName, String name) {
        this.id = id;
        this.regionName = regionName;
        this.name = name;
    }


    public static SmsSendTypeEnum getEnum(Integer id) {
        for (SmsSendTypeEnum smsSendTypeEnum : SmsSendTypeEnum.values()) {
            Integer getId = smsSendTypeEnum.getId();
            if (smsSendTypeEnum.getId().equals(id)) {
                return smsSendTypeEnum;
            }
        }
        return null;
    }

    public Integer getId() {
        return id;
    }

    public String getRegionName() {
        return regionName;
    }

    public String getName() {
        return name;
    }
}
